GUI Functions

Legend:
x is X (left) coordinate, y is Y (top) coordinate, w is Width and h is Height, all of x, y, w and h are v|n.
#v|n is the Object ID and is in the range [1...999]

CHECKBOX(#v|n)

Returns 0 if the given checkbox is unchecked and 1 if it is checked


COLORSELECT(v|n)

Opens the Palm OS standard color selector window, and returns the selected color

Notes:


DOEVENTS

Returns on which object an event occurred (if one occurred)

Return ValueCommentKEYEVENTS
Required
-24, -23, -22, -21App Key #4, #3, #2, #1ON
-13HotSync Button on CradleON | PARTIAL
-12Page Down ButtonON | PARTIAL
-11Page Up ButtonON | PARTIAL
-10Power On/Off ButtonON | PARTIAL
-1ExitAppRequest
0No event
#v|n in [1..999]Object that was clicked (Button, CheckBox, ListChoice, PopupChoice, PushButton, ScrollBar or TextSelector)
1000Pen event (get related information from the PENDOWN, PENX and PENY functions)
1001Menu event (get related information from the MENUITEM function)
1002ABOUTBOX event (for information back to your program)

Notes:


FONTSELECT(v|n)

Opens the Palm OS standard font selector window, and returns the selected font

Notes:


FONTWIDTH(c|t, v|n)

Returns the width in pixels of the c|t text for a given font v|n

Notes:


GETFOCUS

Returns the object ID that has the focus


MENUITEM

Returns the last menu item ID which was selected during the last menu event, 0 if the menu was just opened or -1 if the menu was just closed

Notes:


MESSAGEBOX(c|t1 [+ c|t2 [+ c|t3]], v|n)

Pops up a message window, with a choice of return buttons given by v|n, and returns the button pressed (1=first , 2=second, ...)

Notes:


NOTICEBOX(v|n)

Pops up a message window, with a choice of return buttons given by v|n, and returns the button pressed (1=first , 2=second, ...) or 0 if the message resource does not exist.

The message has to be defined at design time, which is the main difference with MESSAGEBOX.

Notes:


PENDOWN

Returns 1 when pen is down and 0 when pen is up

Notes:


PENX

Returns X position of where the pen was last ticked on the screen

PENY

Returns Y position of where the pen was last ticked on the screen

Notes:


PUSHBUTTON(#v|n)

Returns the status of a push button: 0=not pushed or 1=pushed


SCROLLBAR(#v|n)

Returns the position of the scroll car of a scrollbar, in the [1...100] range


SELECTEDCHOICE

Returns the selected item (0=non selected, 1=first , 2=second, ...) of the last LISTCHOICE or POPUPCHOICE event

Notes:


WAITEVENT

Returns the same values as DOEVENTS (except for the 0=no event value)

Notes:


DATESELECT$(c|t)

Opens the Palm OS standard date selector window, and returns the selected date

Notes:


FIELD$(#v|n)

Retrieves the value stored in a NumField or a TextField

Notes:


TIMESELECT$(c|t)

Opens the Palm OS standard time selector window, and returns the selected time

Notes: